package org.openweathermap.model;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

public class CityInfo {
	public String base;
	public String dt;
	public String id;
	public String name;
	public String cod;
	public Coord coord;
	public Sys sys;
	public Weather[] weather;
	public Main main;
	public Wind wind;
	public Clouds clouds;

	public static CityInfo parse(String json) {
		try {
			Gson gson = new GsonBuilder().create();
			CityInfo city = gson.fromJson(json, CityInfo.class);
			return city;
		} catch (Exception e) {
			return null;
		}
	}
}